package com.william.jdbcplus.test.entity;

import com.william.jdbcplus.common.annotation.TableColumn;
import com.william.jdbcplus.common.annotation.TableFk;
import com.william.jdbcplus.common.annotation.TableId;
import com.william.jdbcplus.common.annotation.TableName;
import com.william.jdbcplus.common.entity.Entity;
import com.william.jdbcplus.common.enums.IdType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName("db_a")
@ApiModel("A表")
public class A extends Entity {
    @ApiModelProperty(value = "主键")
    @TableId(value = "id", remarks = "主键", type = IdType.GUID)
    private String id;

    @ApiModelProperty(value = "B表主键")
    @TableFk(pkEntity = B.class, pkField = "id")
    private String bId;

    @ApiModelProperty(value = "D表主键")
    @TableFk(pkEntity = D.class, pkField = "id")
    private String dId;

    @TableColumn(remarks = "整数", size = 28, nullable = false)
    private Integer num;

}
